<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>匿名slot</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <template id="t1">
        <div>
            <div><h1>头部信息</h1></div>
            <div>
                <slot>这里是插槽部分的内容</slot>
            </div>
            <div><h1>底部信息</h1></div>
         </div>
    </template>
    <div id="app">
        <myalert>
            <h2>这里是课程专区</h2>
        </myalert>
    </div>
</body>
</html>
<script>
    var vm=new Vue({
        el:'#app',
        components:{
            'myalert':{
                template:'#t1'
            }
        }
    });
</script>